// 组织架
import request from '@/utils/request'

// 获取组织架构数据  获取-部门列表
export function getDepartment() {
  return request({
    url: '/company/department'
  })
}
// 获取-部门负责人列表
export const getManagerList = () => {
  return request('/sys/user/simple')
}
/**
 * 新增组织
 * ***/
export const addDepartment = (data) => {
  return request({
    url: '/company/department',
    method: 'POST',
    data
  })
}
// 获取-部门详情
export const getDepartmentDetail = (id) => {
  return request({
    url: `/company/department/${id}`
  })
}
// 编辑
export const updateDepartment = (data) => {
  return request({
    url: `/company/department/${data.id}`,
    method: 'PUT',
    data
  })
}
// 删除
export const delDepartment = (id) => {
  return request({
    url: `/company/department/${id}`,
    method: 'DELETE'
  })
}
